package com.ktjy.ktmall.entity;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品SKU实体类,它对应t_sku_info商品sku表
 * @version v1.0
 * @Author 郴州科泰
 * @Create 2024-07-23 - 10:39
 */
public class SkuItem {
    private int id;
    private int goodsId;  // 商品id
    private String stockSku;  // 商品SKU(唯一编码)
    private BigDecimal price; //当前价格
    private BigDecimal oldPrice; // 原价
    private long inventory;  // 库存数量
    private String picture;  // 商品图片
    private int status;  // 状态(0:正常 1:禁用)
    private String createTime;  // 创建时间
    private String updateTime;  // 修改时间

    // 当前SKU的规格属性列表,一个SKU有个规格属性列表
    private List<AttrItem> specs;
    private GoodsItem goods;  // 商品对象

    public GoodsItem getGoods() {
        return goods;
    }

    public void setGoods(GoodsItem goods) {
        this.goods = goods;
    }

    public SkuItem() {
    }

    public SkuItem(int id, int goodsId, String stockSku, BigDecimal price, BigDecimal oldPrice, long inventory, String picture) {
        this.id = id;
        this.goodsId = goodsId;
        this.stockSku = stockSku;
        this.price = price;
        this.oldPrice = oldPrice;
        this.inventory = inventory;
        this.picture = picture;
    }

    public SkuItem(int id, int goodsId, String stockSku, BigDecimal price, BigDecimal oldPrice, long inventory, String picture, List<AttrItem> specs, int status, String createTime, String updateTime) {
        this.id = id;
        this.goodsId = goodsId;
        this.stockSku = stockSku;
        this.price = price;
        this.oldPrice = oldPrice;
        this.inventory = inventory;
        this.picture = picture;
        this.specs = specs;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public List<AttrItem> getSpecs() {
        return specs;
    }

    public void setSpecs(List<AttrItem> specs) {
        this.specs = specs;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public String getStockSku() {
        return stockSku;
    }

    public void setStockSku(String stockSku) {
        this.stockSku = stockSku;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getOldPrice() {
        return oldPrice;
    }

    public void setOldPrice(BigDecimal oldPrice) {
        this.oldPrice = oldPrice;
    }

    public long getInventory() {
        return inventory;
    }

    public void setInventory(long inventory) {
        this.inventory = inventory;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}
